package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 紫煦桉
 */
public class BooksLending extends AbstractToString {
    private Integer lendNo;
    private BooksMessage booksMessage;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lendDate;
    private ReaderMessage readerMessage;

    public BooksLending() {
    }

    public BooksLending(Integer lendNo) {
        this.lendNo = lendNo;
    }

    public BooksLending(Integer lendNo, Date lendDate) {
        this.lendNo = lendNo;
        this.lendDate = lendDate;
    }

    public BooksLending(Integer lendNo, BooksMessage booksMessage, Date lendDate, ReaderMessage readerMessage) {
        this.lendNo = lendNo;
        this.booksMessage = booksMessage;
        this.lendDate = lendDate;
        this.readerMessage = readerMessage;
    }

    public Integer getLendNo() {
        return lendNo;
    }

    public void setLendNo(Integer lendNo) {
        this.lendNo = lendNo;
    }

    public BooksMessage getBooksMessage() {
        return booksMessage;
    }

    public void setBooksMessage(BooksMessage booksMessage) {
        this.booksMessage = booksMessage;
    }

    public Date getLendDate() {
        return lendDate;
    }

    public void setLendDate(Date lendDate) {
        this.lendDate = lendDate;
    }

    public ReaderMessage getReaderMessage() {
        return readerMessage;
    }

    public void setReaderMessage(ReaderMessage readerMessage) {
        this.readerMessage = readerMessage;
    }
}
